#include <QQuickView>
#include <QGuiApplication>
#include <QQmlContext>

int main(int argc, char *argv[])
{
   QGuiApplication app(argc, argv);

   QQuickView view;
   view.setTitle("倒计时小程序");
   view.rootContext()->setContextProperty("view", &view);
   view.setSource(QUrl(QStringLiteral("qrc:/main.qml")));

   QSurfaceFormat surfaceFormat = view.requestedFormat();
   surfaceFormat.setAlphaBufferSize(8);
   view.setClearBeforeRendering(true);
   view.setColor(QColor(Qt::transparent));
   view.setFlags(Qt::FramelessWindowHint | Qt::SubWindow | Qt::WindowStaysOnTopHint);
   view.setFormat(surfaceFormat);

   view.show();
   return app.exec();
}
